package pinpass;

public class PinPassProxy implements pinpass.PinPass {
  private String _endpoint = null;
  private pinpass.PinPass pinPass = null;
  
  public PinPassProxy() {
    _initPinPassProxy();
  }
  
  public PinPassProxy(String endpoint) {
    _endpoint = endpoint;
    _initPinPassProxy();
  }
  
  private void _initPinPassProxy() {
    try {
      pinPass = (new pinpass.PinPassServiceLocator()).getPinPass();
      if (pinPass != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)pinPass)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)pinPass)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (pinPass != null)
      ((javax.xml.rpc.Stub)pinPass)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public pinpass.PinPass getPinPass() {
    if (pinPass == null)
      _initPinPassProxy();
    return pinPass;
  }
  
  public java.lang.String validacion(java.lang.String coordenada2, java.lang.String coordenada) throws java.rmi.RemoteException{
    if (pinPass == null)
      _initPinPassProxy();
    return pinPass.validacion(coordenada2, coordenada);
  }
  
  public java.lang.String validarUsuario(java.lang.String usuario, java.lang.String clave) throws java.rmi.RemoteException{
    if (pinPass == null)
      _initPinPassProxy();
    return pinPass.validarUsuario(usuario, clave);
  }
  
  
}